package com.bj.ski.base.database

import androidx.room.Ignore
import androidx.room.PrimaryKey
import com.ai3d.rfid.common.proxy.MMKVProxy
import com.bj.ski.base.common.utils.DateFormatUtils
import com.bj.ski.base.common.utils.DateFormatUtils.DATE_FORMAT_PATTERN_YMD_HM
import com.bj.ski.base.common.utils.DiscConstants
import java.io.Serializable

/**
 * @ProjectName : disc
 * @Author : weijinsong
 * @Time : 2023/7/3 22:00
 * @Description : 文件描述
 */
@androidx.room.Entity(tableName = "EventReq")
data class EventReq(
    //[gameName, level, stage, stageType, sessionId, eventType, gameSessionId, levelSessionId, firstLanguage, secondLanguage, theme, eventTime, userId]
    var gameName: Int? = null,//游戏名称
    var level: Int? = null,//难度
    var stage: Int? = null,//关卡
    var stageType: Int? = null,//关卡类型
    var sessionId: String? = null,//关卡会话id
    var eventType: Int? = null,//事件类型
    var gameSessionId: String? = null,//游戏会话id
    var levelSessionId: String? = null,//游戏难度会话id
    var firstLanguage: String = MMKVProxy.getString(
        MMKVProxy.KEY_SETTINGS_LANGUAGE_MAIN,
        DiscConstants.HEADER_CONTENT_LANGUAGE_EN_US
    ),
    var secondLanguage: String = MMKVProxy.getString(
        MMKVProxy.KEY_SETTINGS_LANGUAGE_ASSIST,
        DiscConstants.HEADER_CONTENT_LANGUAGE_EN_US
    )
) : Serializable {
    @Ignore // 使用 @Ignore 注解来排除这个构造函数
    constructor() : this(
        null, null, null, null, null,
        null, null, null,  "", ""
    )
    @PrimaryKey(autoGenerate = true)
    var id: Long = 0
    var theme: String? = ""//主题 比如 uot的coin和bed
    var eventTime: String = DateFormatUtils.long2Str(//事件时间
        System.currentTimeMillis(),
        DATE_FORMAT_PATTERN_YMD_HM
    )
    var userId: String = MMKVProxy.getString(MMKVProxy.KEY_USER_ID, "")

}